/**
 * @Author：ming
 * @Date：2023/10/2 9:39 PM
 * @Filename：Hj8
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @author ming
 */
public class hj13 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str ;
        while ((str=br.readLine())!=null){
            String[] split = str.split(" ");
            StringBuilder sb = new StringBuilder();
            for (int i = split.length-1; i >=0; i--) {
                sb.append(split[i]).append(" ");
            }
            System.out.println(sb.toString().trim());
        }
    }
}
